package Homework;

public class HomeWork04_k {
    public static void main(String[] args) {
        int count =0;
        for(int n=1900;n<=2024;n++){
            if((n%4==0&&n%100!=0)||n%400==0){
                System.out.print(n+"\t");
                count++;
                if(count%10==0){
                    System.out.println();
                }
            }
        }

        int sum=0;

        for(int n=1;n<=100;n++){
            if(n%2==0){
                sum+=n;
            }
        }
        System.out.println("1到100之间偶数的和为"+sum);


        int factori=1;
        for (int i=1;i<=8;i++){
            factori *=i;
        }
        System.out.println("8的阶乘为"+factori);

//        int count2=1;
//        for (int i=1;i<=6;i++){
//
//            for (int n=1;n<=count2;n++){
//                System.out.print("*");
//            }
//            count2+=2;
//            System.out.println();
//        }

        for (int i=1;i<=6;i++){

            for (int n=1;n<=2*i-1;n++){
                System.out.print("*");
            }

            System.out.println();
        }


    }
}
